<div class="form">
    <?php
    Util::tsRegisterAssetJs('cargarQR.js');
    /** @var EstudianteController $this */
    /** @var Estudiante $model */
    /** @var AweActiveForm $form */
    $form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
        'type' => 'horizontal',
        'id' => 'estudiante-form',
        'enableAjaxValidation' => true,
        'clientOptions' => array('validateOnSubmit' => false, 'validateOnChange' => true,),
        'enableClientValidation' => false,
    ));
    ?>

<?php echo $form->errorSummary($model) ?>



    <div class="span12 ">
        <?php echo $form->textFieldRow($model, 'cedula') ?>

<?php echo $form->textFieldRow($model, 'nombre', array('maxlength' => 45)) ?>
    </div>

    <div class="span12 ">
        <?php echo $form->textFieldRow($model, 'direccion', array('maxlength' => 100)) ?>

<?php echo $form->textFieldRow($model, 'telefono', array('maxlength' => 20)) ?>
    </div>
    <?php // !$model->isNewRecord?>
    <div class="span12 " >
        <div width="170" height="170" id="contenedorCedula">
            <?php
            $this->renderPartial('_imagenQR',array('cedula'=>$model->cedula?$model->cedula:'1'));
//            $this->widget('application.extensions.qrcode.QRCode', array(
//                'content' => $model->cedula, // qrcode data content
//                'filename' => $model->cedula.'.png', // image name (make sure it should be .png)
//                'width' => '150', // qrcode image height 
//                'height' => '150', // qrcode image width 
//                'encoding' => 'UTF-8', // qrcode encoding method 
//                'correction' => 'H', // error correction level (L,M,Q,H)
//                'watermark' => 'No' // set Yes if you want watermark image in Qrcode else 'No'. for 'Yes', you need to set watermark image $stamp in QRCode.php
//            ));
            ?></div>
    </div>

    <?php?>

    <div class="form-actions">
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'submit',
            'type' => 'primary',
            'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
        ));
        ?>
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            //'buttonType'=>'submit',
            'label' => Yii::t('AweCrud.app', 'Cancel'),
            'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
        ));
        ?>
    </div>

<?php $this->endWidget(); ?>
</div>